package cn.sw.system.movies.controller;


import cn.sw.common.database.architecture.controller.BaseController;
import cn.sw.common.database.architecture.emun.BaseServiceOf;
import cn.sw.common.database.domain.dto.form.MoviesContentDetailsFormDto;
import cn.sw.common.database.domain.dto.query.MoviesContentDetailsQueryDto;
import cn.sw.common.database.domain.entity.MoviesContentDetails;
import cn.sw.common.database.domain.vo.vo.MoviesContentDetailsVo;
import cn.sw.common.http.HttpResponse;
import cn.sw.system.movies.agg.domain.form.MoviesMoviesContentForm;
import cn.sw.system.movies.agg.service.impl.AggMoviesMoviesContentServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 影视类型内容详情 前端控制器
 *
 * @author 张众森 (个人博客:https://)
 * @date 2025-06-29
 * @tags 做一个优秀的全栈架构
 */
@Api(tags = "MoviesContentDetails控制器")
@RestController
@RequestMapping("/movies-content-details")
@BaseServiceOf(MoviesContentDetails.class)
public class MoviesContentDetailsController extends BaseController<MoviesContentDetails, MoviesContentDetailsFormDto, MoviesContentDetailsQueryDto, MoviesContentDetailsVo> {

    @Resource
    private AggMoviesMoviesContentServiceImpl aggMoviesMoviesContentService;


    @PostMapping("/AggC")
    public HttpResponse<String> AggC(@RequestBody MoviesMoviesContentForm form) throws Exception {
        boolean b = aggMoviesMoviesContentService.aggCreate(form);
        if (b) {
            return HttpResponse.ok();
        }
        return HttpResponse.error();
    }

}
